OHI Toolbox for the Baltic

Ben Best (bbest@nceas.ucsb.eduas)
2014-05-14

Outline

  • Goals
  • Demo
  • Details
  • Next

Goals

  • Recalculate OHI globally or regionally using alternative weights, equations, layers, etc.
  • Regionalize based on administrative boundaries finer than EEZ.
  • Visualize results to highlight best opportunities for improving ocean health.
  • Interface with easy-to-use forms for sliding weights and concocting scenarios.
  • Automate with tools for manipulating input layers and calculating OHI scores for sensitivity analyses.

Regionalize

US West Coast Halpern et al (in press) PLoS ONE US West Coast

Brazil Elfes et al (2014) PLoS ONE Brazil

Visualize

Flower flower

Map map

Software choices for reproducible science

free, cross-platform, open source, web based

  • R having libraries shiny web application, ggplot2 figures, dplyr data manipulation
  • csv (comma-seperated value) data files. ancillary: md, json, shp, geotiff
    • Excel poor with Unicode, file locking. Try OpenOffice instead.
  • Github repositories: ohicore, ohigui, ohibaltic
    • backup to offsite archive, and rewind changes
    • document changes of code and files with issues and messages
    • collaborate with others and publish to web site

Products and Processes

flow

Demo

Outline

  • Goals
  • Demo
  • Details
  • Next

Scenario files

  • layers.csv, layers/
    • *.csv
  • scenario.R, conf/
    • config.R
    • pressures_matrix.csv, resilience_matrix.csv, resilience_weights.csv
    • goals.csv
    • functions.R
  • spatial/regions_gcs.js
  • launchApp_code.R, launchApp.bat (Win), launchApp.command (Mac)
  • scores.csv
  • results/report.html, /figures

Simulation

For example, calculate Baltic Health Index every year using scenarios bhi_1980,..., bhi_2014 as folders. (Jasper's suggestion)

library(ohicore)
dir_scenarios = '~/ohibaltic/scenarios'

for (yr in 1980:2014){
  scenario = paste0('bhi_', yr)
  setwd(file.path(dir_scenarios, scenario))

  conf   = Conf('conf')
  layers = Layers('layers.csv', 'layers')
  scores = CalculateAll(conf, layers)

  write.csv(scores, 'scores.csv')
}

Outline

  • Goals
  • Demo
  • Details
  • Next

Next for toolbox

  1. Fold ohigui into ohicore.
  2. “Clip and ship” subnational OHI assessments for all countries globally.
  3. Make gui interactive online, a la shiny gallery.
  4. Add comparison report of scenarios feature.
  5. Add “Description” tab under “Data” for equations / details per input layer / output score.
  6. Document layers using Tabular Data Package format.
  7. Integrate histogram and map using rMaps.
  8. Capture uncertainty…

Next for BHI: pressures

Next for BHI: time series, esp CW (N, O)

Carstensen, J., Andersen, J.H., Gustafsson, B.G., and Conley, D.J. (2014). Deoxygenation of the Baltic Sea during the last century. PNAS. CarstensenEtal2014_DeoxygenationBaltic

Next for BHI...

  1. Fix regions.
  2. Extract coastal population, area, etc for aggregating up to country or basin and disaggregating from global get rgn weightings by popn, area, coastal strip, revenue etc and disaggregate global layers more appropriately
  3. Consider resilience measures